<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<canvas id="can1" width="400" height="500">
		</canvas>
	</body>
	<script>
		window.onload = function(){
			var $can1 = document.getElementById("can1");
			var cxt = $can1.getContext("2d");
			 cxt.fillStyle = "red";
			 cxt.strokeStyle="yellow";
			 cxt.beginPath();   
			 cxt.moveTo(200,0);   
			 cxt.lineTo(0,400);   
			 cxt.lineTo(400,400);   
			 
			 cxt.lineTo(200,0); 
			 cxt.moveTo(200,0);
			 cxt.lineTo(50,200);
			 cxt.lineTo(0,400); 
			 
			 cxt.moveTo(200,0);
			 cxt.lineTo(350,200);
			 cxt.lineTo(400,400);
			 cxt.closePath();   
			 cxt.stroke();
		}
	</script>
</html>
